Optimal. Leaf size=70 \[ -\frac{\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{c^2 \sqrt{b^2-4 a c}}-\frac{b \log \left (a+b x+c x^2\right )}{2 c^2}+\frac{x}{c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0587906, antiderivative size = 70, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {1585, 703, 634, 618, 206, 628} \[ -\frac{\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{c^2 \sqrt{b^2-4 a c}}-\frac{b \log \left (a+b x+c x^2\right )}{2 c^2}+\frac{x}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1585
Rule 703
Rule 634
Rule 618
Rule 206
Rule 628
Rubi steps
\begin{align*} \int \frac{x^4}{a x^2+b x^3+c x^4} \, dx &=\int \frac{x^2}{a+b x+c x^2} \, dx\\ &=\frac{x}{c}+\frac{\int \frac{-a-b x}{a+b x+c x^2} \, dx}{c}\\ &=\frac{x}{c}-\frac{b \int \frac{b+2 c x}{a+b x+c x^2} \, dx}{2 c^2}+\frac{\left (b^2-2 a c\right ) \int \frac{1}{a+b x+c x^2} \, dx}{2 c^2}\\ &=\frac{x}{c}-\frac{b \log \left (a+b x+c x^2\right )}{2 c^2}-\frac{\left (b^2-2 a c\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{c^2}\\ &=\frac{x}{c}-\frac{\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{c^2 \sqrt{b^2-4 a c}}-\frac{b \log \left (a+b x+c x^2\right )}{2 c^2}\\ \end{align*}
Mathematica [A] time = 0.0636759, size = 73, normalized size = 1.04 \[ \frac{\left (b^2-2 a c\right ) \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right )}{c^2 \sqrt{4 a c-b^2}}-\frac{b \log \left (a+b x+c x^2\right )}{2 c^2}+\frac{x}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 101, normalized size = 1.4 \begin{align*}{\frac{x}{c}}-{\frac{b\ln \left ( c{x}^{2}+bx+a \right ) }{2\,{c}^{2}}}-2\,{\frac{a}{c\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+{\frac{{b}^{2}}{{c}^{2}}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.6885, size = 537, normalized size = 7.67 \begin{align*} \left [-\frac{{\left (b^{2} - 2 \, a c\right )} \sqrt{b^{2} - 4 \, a c} \log \left (\frac{2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c + \sqrt{b^{2} - 4 \, a c}{\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) - 2 \,{\left (b^{2} c - 4 \, a c^{2}\right )} x +{\left (b^{3} - 4 \, a b c\right )} \log \left (c x^{2} + b x + a\right )}{2 \,{\left (b^{2} c^{2} - 4 \, a c^{3}\right )}}, -\frac{2 \,{\left (b^{2} - 2 \, a c\right )} \sqrt{-b^{2} + 4 \, a c} \arctan \left (-\frac{\sqrt{-b^{2} + 4 \, a c}{\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) - 2 \,{\left (b^{2} c - 4 \, a c^{2}\right )} x +{\left (b^{3} - 4 \, a b c\right )} \log \left (c x^{2} + b x + a\right )}{2 \,{\left (b^{2} c^{2} - 4 \, a c^{3}\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.647319, size = 306, normalized size = 4.37 \begin{align*} \left (- \frac{b}{2 c^{2}} - \frac{\sqrt{- 4 a c + b^{2}} \left (2 a c - b^{2}\right )}{2 c^{2} \left (4 a c - b^{2}\right )}\right ) \log{\left (x + \frac{- a b - 4 a c^{2} \left (- \frac{b}{2 c^{2}} - \frac{\sqrt{- 4 a c + b^{2}} \left (2 a c - b^{2}\right )}{2 c^{2} \left (4 a c - b^{2}\right )}\right ) + b^{2} c \left (- \frac{b}{2 c^{2}} - \frac{\sqrt{- 4 a c + b^{2}} \left (2 a c - b^{2}\right )}{2 c^{2} \left (4 a c - b^{2}\right )}\right )}{2 a c - b^{2}} \right )} + \left (- \frac{b}{2 c^{2}} + \frac{\sqrt{- 4 a c + b^{2}} \left (2 a c - b^{2}\right )}{2 c^{2} \left (4 a c - b^{2}\right )}\right ) \log{\left (x + \frac{- a b - 4 a c^{2} \left (- \frac{b}{2 c^{2}} + \frac{\sqrt{- 4 a c + b^{2}} \left (2 a c - b^{2}\right )}{2 c^{2} \left (4 a c - b^{2}\right )}\right ) + b^{2} c \left (- \frac{b}{2 c^{2}} + \frac{\sqrt{- 4 a c + b^{2}} \left (2 a c - b^{2}\right )}{2 c^{2} \left (4 a c - b^{2}\right )}\right )}{2 a c - b^{2}} \right )} + \frac{x}{c} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.08301, size = 90, normalized size = 1.29 \begin{align*} \frac{x}{c} - \frac{b \log \left (c x^{2} + b x + a\right )}{2 \, c^{2}} + \frac{{\left (b^{2} - 2 \, a c\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c} c^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]